/*
 * RobotARepresenter.h
 *
 *  Created on: 24 nov. 2012
 *      Author: guegan
 */

#ifndef ROBOTAREPRESENTER_H_
#define ROBOTAREPRESENTER_H_

#include <list>
#include "Afficheur.h"

using namespace std;

class RobotARepresenter {

private:
	list<Afficheur *> afficheurs;

public:
	void attacherAfficheur(Afficheur* aff){
		afficheurs.push_back(aff);
	}
	void detacherAfficheur(Afficheur* aff){
		afficheurs.remove(aff);
	}
	void notifier(){
		list<Afficheur* >::const_iterator it;
		for (it = afficheurs.begin(); it != afficheurs.end(); it++)
			(*it)->miseAJour();
	}

};

#endif /* ROBOTAREPRESENTER_H_ */
